<%@ page import="com.dao.MessageDao" %>
<%@ page import="com.bean.Message" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 24497
  Date: 2020/8/2 0002
  Time: 22:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>查看用户借阅情况</title>
</head>
<body>
<%
    String name = (String) session.getAttribute("name");
    MessageDao messageDao = new MessageDao();
    List<Message> list = messageDao.getMessage(name);
    if (list.size() == 0) {
        out.write("您还未借任何书");
    } else {
        for (Message message : list) {
            out.write(message.toString());
            out.write("<br>");
        }

    }

%>
<br><br>
<a href="${pageContext.request.contextPath}/returnBook.jsp">还书</a><br>
<a href="${pageContext.request.contextPath}/borrowBook.jsp">借书</a><br>
<a href="${pageContext.request.contextPath}/loginOut.jsp">注销</a><br><br>

</body>
</html>
